<!-- tab切换 -->
<template>
    <div class="ccui-tab-wrapper">
        <el-button
            v-for="(item, index) in tabBtn"
            :type="isActive === index ? 'table-top-active' : 'table-top'"
            :key="item.value"
            @click="tabChange(item)"
            size="mini"
        >
            {{ item.label }}
            <span v-show="isActive === index">({{ totalNum }})</span>
        </el-button>
    </div>
</template>

<script>
export default {
    name: "tabToggle",
    props: {
        tabBtn: {
            type: Array,
            default: () => []
        },
        isActive: {
            type: Number,
            default: 0
        },
        totalNum: {
            type: Number,
            default: 0
        }
    },
    methods: {
        tabChange(data) {
            this.$emit("tabChange", data);
        }
    }
}
</script>

<style scoped>

</style>